<?php
class label_formModel extends baseModel{

    public function form_list($data){
        if(empty($data['form'])){
            return;
        }else{
            $where['form'] = in($data['form']);
        }
        if (!empty($data['where'])) {
            $where['where'] = $data['where'];
        }
        if (!empty($data['limit'])) {
            $where['limit'] = $data['limit'];
        }else{
            $where['limit'] = 10;
        }
        if (!empty($data['order'])) {
            $where['order'] = $data['order'];
        }else{
            $where['order'] = 'id desc';
        }

        $this->table='form_data_'.$where['form'];

        //获取表单信息
        $data=$this->select($where['where'],'',$where['order'],$where['limit']);
        if(!empty($data)){
            $i=0;
            foreach ($data as $key=>$value) {
                $i++;
                $list[$key]=$value;
                $list[$key]['i']=$i;
            }
        }
        return $list;

    }


}

?>